<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="../../common/header.jsp"/>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
jQuery(document).ready(function() {    
});

	function check() {
		document.getElementById('ok').disabled = 'disabled';
	}

	function backrolelist() {
		$("#roleform").attr("action","<%=request.getContextPath()%>/base/language/list" );
		$("#roleform").submit();
	
/* 	function selectThis(id){
		
	} */
	
}
</script>
</head>
<body class="page-header-fixed page-full-width">


	<!-- content -->
		<div class="page-content">
			
		
				<div class="container-fluid">
				
				<div class="row-fluid">
				
									<div class="span12">
										
									
										<h3 class="page-title">
				
											<small></small>
				
										</h3> 
				
										<ul class="breadcrumb">
				
											<li>
				
												<i class="icon-home"></i>
				
												<a href="index.html">Home</a> 
				
												<i class="icon-angle-right"></i>
				
											</li>
				
											<li>
				
												<a href="#">系统管理</a>
				
												<i class="icon-angle-right"></i>
				
											</li>
				
											<li><a href="#">语言管理</a></li>
				
										</ul>
				
				
									</div>
								</div>
								
								<div class="portlet-body form">
								
								<c:if test="${success==false}">
						<div class="alert alert-failure">
							<button class="close" data-dismiss="alert"></button>
							<strong><spring:message code="failure"></spring:message>!</strong> ${errorMsg}
						</div>
					</c:if>
								
						<c:if test="${success }">
						<div class="alert alert-success">
											<button class="close" data-dismiss="alert"></button>
											<strong><spring:message code="success"></spring:message>!</strong>
											 <spring:message code="save success"></spring:message>!
										</div>
						</c:if>
						<h3 class="page-title">
						<%-- <c:if test="${module.module_role_id==null }"><spring:message code="btn.common.add.role"></spring:message></c:if>
						<c:if test="${module.module_role_id!=null }"><spring:message code="btn.common.edit.role"></spring:message></c:if> --%>
						
						<c:if test="${baseLanguage.baseLanguageId==null }"><spring:message code="btn.common.add.language"></spring:message></c:if>
						<c:if test="${baseLanguage.baseLanguageId!=null }"><spring:message code="btn.common.edit.language"></spring:message></c:if>
						</h3>
						
					<form action="<c:if test="${baseLanguage.baseLanguageId==null}">add</c:if>
							<c:if test="${baseLanguage.baseLanguageId!=null}">edit</c:if>" 
							method="post" class="form-horizontal" id="roleform" onsubmit="return check();">
							<input type="hidden" name="sorting_column_order" id="sorting_column_order" value="${sorting_column_order }"/>
								<input type="hidden" name="sorting_asc_desc"  id="sorting_asc_desc" value="${sorting_asc_desc}"/>
								<input type="hidden" name="searchValue"  value="${searchValue}"/>
								<input type="hidden" name="rList" value="${baseLanguageList}"/> 
								<input type="hidden" name="id" value="${baseLanguage.baseLanguageId}"></input>
								<input type="hidden" name="token" value="${token}"></input>
																								
								<div class="control-group">
								<label class="control-label">模块名称:</label>
									<div class="control-group">
									<div class="controls">
									 <select tabindex="1" data-placeholder="Choose a moduleInfoCode"
										class="span2 m-wrap" name="moduleInfoId" 
										<c:if test="${baseLanguage.moduleInfoId!=moduleInfo.moduleInfoId}"> disabled="disabled"  </c:if>
										>
										<option value="-1">--请选择--</option>
											<c:forEach var="moduleInfo" items="${listModuleInfos}">
											<option
											<c:if test="${baseLanguage.moduleInfoId==moduleInfo.moduleInfoId}">selected="selected"  </c:if>
											value="${moduleInfo.moduleInfoId}">${moduleInfo.moduleName}</option>
											</c:forEach>
									</select>  
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">lKey值：</label>
										<div class="controls">

										<input type="text" maxlength="200" name="lKey" value="${baseLanguage.lKey}" class="m-wrap" required />
										<span class="help-inline"></span>

										</div>
								</div>
						
								<div class="control-group">
									<label class="control-label">英文名：</label>
									<div class="controls">
		
										<input type="text" maxlength="200" name="enVal"
											value="${baseLanguage.enVal}" class="m-wrap" required />
										<span class="help-inline"></span>
		
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">中文名：</label>
									<div class="controls">
		
										<input type="text" maxlength="200" name="cnVal"
											value="${baseLanguage.cnVal}" class="m-wrap" required />
										<span class="help-inline"></span>
		
									</div>
								</div>
								
						
								<div class="control-group">
									<label class="control-label">备注一：</label>
									<div class="controls">
		
										<input type="text" maxlength="200" name="extValOne"
											value="${baseLanguage.extValOne}" class="m-wrap" required />
										<span class="help-inline"></span>
		
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">备注二：</label>
									<div class="controls">
		
										<input type="text" maxlength="200" name="extValTwo"
											value="${baseLanguage.extValTwo}" class="m-wrap" required />
										<span class="help-inline"></span>
		
									</div>
								</div>

								<div class="form-actions">
				
										<button type="submit" class="btn blue" id="ok"><spring:message
									code="btn.common.save"></spring:message></button>

										<button type="button" onclick="backrolelist();" class="btn"><spring:message
									code="btn.common.back"></spring:message></button>
				
								</div>
								</div>
								</form>
								
				</div>
				
				</div>
		
		</div>

	<!-- content end -->




</body>
</html>